<?php
namespace app\index\controller;
use app\index\logic\UserLogic;
use EasyWeChat\Foundation\Application;


class Wechat
{
    use \traits\controller\Jump;
    public function oauth_call_back(){
        $wechat = new Application(get_wechat_config());
        $info = $wechat->oauth->user();
        $logic = new UserLogic();
        $logic->update_user($info['original']);
        $this->redirect(url('/index/index/index'));
    }
}
